﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ElectrosLtdApplication.Models
{
    public class LoginModel
    {
        [Required(ErrorMessage="Username is required")]
        public string Username { get; set; }

        [Required(ErrorMessage="Token is required")]
        public string Token { get; set; }

        [Required(ErrorMessage="PIN is required")]
        [RegularExpression("^[0-9]{4}$", ErrorMessage="Enter a 4-digit pin")]
        public int PIN { get; set; }
    }
}